home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / COLORTBX.DMO < prev    next >
Text File  |  1996-07-04  |  3KB  |  47 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   COLORTBX.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. $INCLUDE "DAS-NB01.INC"
  19. $INCLUDE "DAS-NBT1.INC"
  20. COLOR 7, 0
  21. CLS
  22. ? "┌────────────────────────────────────────────────────────────────────────
  23. ? "│ TBoxCOLOR  ( Row?, Col?, Rows?, Cols?, Attr? )  both fore and back
  24. ? "│ TBoxCOLORB ( Row?, Col?, Rows?, Cols?, Back? )  background only
  25. ? "│ TBoxCOLORF ( Row?, Col?, Rows?, Cols?, Fore? )  foreground only
  26. ? "├─────────────────────────────────────────────────────────────────────────────
  27. ? "│ Change the attribute, foreground color, or background color for a 
  28. ? "│ rectangular area of the screen.
  29. ? "└─────────────────────────────────────────────────────────────────────────────
  30.  
  31. A% = 1000                                   '│ for quick padding with 0's
  32. FOR Back? = 0 TO 15                         '│ background colors
  33.   Row? = Back? + 9                          '│  screen row
  34.   TBoxCOLORB Row?, 1, 1, 80, Back?          '│  paint bkground for row
  35.   Col? = 2                                  '│  starting column
  36.   FOR Fore? = 0 to 15                       '│   foreground colors
  37.     D$ = RIGHT$( USING$( "####", A% ), 3 )  '│   make a string
  38.     Tprint Row?, Col?, D$, 0                '│   print string using scrn attr
  39.     TBoxCOLORF Row?, Col?, 1, 3, Fore?      '│   paint the foregrounds
  40.     INCR A%, 1                              '│   next BINARY ATTR
  41.     INCR Col?, 5                            '│   incr the columns
  42.   NEXT                                      '│  next foreground
  43. NEXT                                        '│ next background
  44. Tprint 25, 69, "PRESS A KEY", 14            '│ print msg
  45. fAnyKey                                     '│ await a key-press
  46. TBoxCOLOR 9, 1, 16, 80, 7                   '│ paint whole grid F&B
  47. Tprint 25, 69, " THANK YOU ", 10            '│ BE POLITE!